.class public Lcom/TwinBlade/PicturePassword/TouchImageView;
.super Landroid/widget/ImageView;
.source "SourceFile"


# instance fields
.field a:I

.field public b:I

.field public c:I

.field protected d:F

.field protected e:F

.field private f:Landroid/graphics/Matrix;

.field private g:Landroid/graphics/PointF;

.field private h:Landroid/graphics/PointF;

.field private i:F

.field private j:F

.field private k:[F

.field private l:F

.field private m:I

.field private n:Landroid/view/ScaleGestureDetector;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .locals 2
    .parameter

    .prologue
    const/high16 v1, 0x3f80

    .line 37
    invoke-direct {p0, p1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

    .line 20
    const/4 v0, 0x0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->a:I

    .line 22
    new-instance v0, Landroid/graphics/PointF;

    invoke-direct {v0}, Landroid/graphics/PointF;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->g:Landroid/graphics/PointF;

    .line 23
    new-instance v0, Landroid/graphics/PointF;

    invoke-direct {v0}, Landroid/graphics/PointF;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->h:Landroid/graphics/PointF;

    .line 24
    iput v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->i:F

    .line 25
    const/high16 v0, 0x4040

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->j:F

    .line 30
    iput v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    .line 38
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/TouchImageView;->a(Landroid/content/Context;)V

    .line 39
    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 2
    .parameter
    .parameter

    .prologue
    const/high16 v1, 0x3f80

    .line 42
    invoke-direct {p0, p1, p2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;)V

    .line 20
    const/4 v0, 0x0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->a:I

    .line 22
    new-instance v0, Landroid/graphics/PointF;

    invoke-direct {v0}, Landroid/graphics/PointF;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->g:Landroid/graphics/PointF;

    .line 23
    new-instance v0, Landroid/graphics/PointF;

    invoke-direct {v0}, Landroid/graphics/PointF;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->h:Landroid/graphics/PointF;

    .line 24
    iput v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->i:F

    .line 25
    const/high16 v0, 0x4040

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->j:F

    .line 30
    iput v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    .line 43
    invoke-direct {p0, p1}, Lcom/TwinBlade/PicturePassword/TouchImageView;->a(Landroid/content/Context;)V

    .line 44
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/TouchImageView;)F
    .locals 1
    .parameter

    .prologue
    .line 30
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    return v0
.end method

.method private a(Landroid/content/Context;)V
    .locals 3
    .parameter

    .prologue
    .line 47
    const/4 v0, 0x1

    invoke-super {p0, v0}, Landroid/widget/ImageView;->setClickable(Z)V

    .line 48
    new-instance v0, Landroid/view/ScaleGestureDetector;

    new-instance v1, Lcom/TwinBlade/PicturePassword/cu;

    const/4 v2, 0x0

    invoke-direct {v1, p0, v2}, Lcom/TwinBlade/PicturePassword/cu;-><init>(Lcom/TwinBlade/PicturePassword/TouchImageView;Lcom/TwinBlade/PicturePassword/cu;)V

    invoke-direct {v0, p1, v1}, Landroid/view/ScaleGestureDetector;-><init>(Landroid/content/Context;Landroid/view/ScaleGestureDetector$OnScaleGestureListener;)V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->n:Landroid/view/ScaleGestureDetector;

    .line 49
    new-instance v0, Landroid/graphics/Matrix;

    invoke-direct {v0}, Landroid/graphics/Matrix;-><init>()V

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    .line 50
    const/16 v0, 0x9

    new-array v0, v0, [F

    iput-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->k:[F

    .line 51
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 52
    sget-object v0, Landroid/widget/ImageView$ScaleType;->MATRIX:Landroid/widget/ImageView$ScaleType;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setScaleType(Landroid/widget/ImageView$ScaleType;)V

    .line 54
    new-instance v0, Lcom/TwinBlade/PicturePassword/ct;

    invoke-direct {v0, p0}, Lcom/TwinBlade/PicturePassword/ct;-><init>(Lcom/TwinBlade/PicturePassword/TouchImageView;)V

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setOnTouchListener(Landroid/view/View$OnTouchListener;)V

    .line 99
    return-void
.end method

.method static synthetic a(Lcom/TwinBlade/PicturePassword/TouchImageView;F)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 30
    iput p1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    return-void
.end method

.method static synthetic b(Lcom/TwinBlade/PicturePassword/TouchImageView;)F
    .locals 1
    .parameter

    .prologue
    .line 25
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->j:F

    return v0
.end method

.method static synthetic c(Lcom/TwinBlade/PicturePassword/TouchImageView;)F
    .locals 1
    .parameter

    .prologue
    .line 24
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->i:F

    return v0
.end method

.method static synthetic d(Lcom/TwinBlade/PicturePassword/TouchImageView;)Landroid/graphics/Matrix;
    .locals 1
    .parameter

    .prologue
    .line 15
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    return-object v0
.end method

.method static synthetic e(Lcom/TwinBlade/PicturePassword/TouchImageView;)Landroid/view/ScaleGestureDetector;
    .locals 1
    .parameter

    .prologue
    .line 34
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->n:Landroid/view/ScaleGestureDetector;

    return-object v0
.end method

.method static synthetic f(Lcom/TwinBlade/PicturePassword/TouchImageView;)Landroid/graphics/PointF;
    .locals 1
    .parameter

    .prologue
    .line 22
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->g:Landroid/graphics/PointF;

    return-object v0
.end method

.method static synthetic g(Lcom/TwinBlade/PicturePassword/TouchImageView;)Landroid/graphics/PointF;
    .locals 1
    .parameter

    .prologue
    .line 23
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->h:Landroid/graphics/PointF;

    return-object v0
.end method


# virtual methods
.method a(FFF)F
    .locals 4
    .parameter
    .parameter
    .parameter

    .prologue
    const/4 v0, 0x0

    .line 150
    cmpg-float v1, p3, p2

    if-gtz v1, :cond_1

    .line 152
    sub-float v1, p2, p3

    move v2, v0

    .line 158
    :goto_0
    cmpg-float v3, p1, v2

    if-gez v3, :cond_2

    .line 159
    neg-float v0, p1

    add-float/2addr v0, v2

    .line 162
    :cond_0
    :goto_1
    return v0

    .line 154
    :cond_1
    sub-float v1, p2, p3

    move v2, v1

    move v1, v0

    .line 155
    goto :goto_0

    .line 160
    :cond_2
    cmpl-float v2, p1, v1

    if-lez v2, :cond_0

    .line 161
    neg-float v0, p1

    add-float/2addr v0, v1

    goto :goto_1
.end method

.method a()V
    .locals 6

    .prologue
    const/4 v5, 0x0

    .line 136
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->k:[F

    invoke-virtual {v0, v1}, Landroid/graphics/Matrix;->getValues([F)V

    .line 137
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->k:[F

    const/4 v1, 0x2

    aget v0, v0, v1

    .line 138
    iget-object v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->k:[F

    const/4 v2, 0x5

    aget v1, v1, v2

    .line 140
    iget v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    int-to-float v2, v2

    iget v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->d:F

    iget v4, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    mul-float/2addr v3, v4

    invoke-virtual {p0, v0, v2, v3}, Lcom/TwinBlade/PicturePassword/TouchImageView;->a(FFF)F

    move-result v0

    .line 141
    iget v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    int-to-float v2, v2

    iget v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->e:F

    iget v4, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    mul-float/2addr v3, v4

    invoke-virtual {p0, v1, v2, v3}, Lcom/TwinBlade/PicturePassword/TouchImageView;->a(FFF)F

    move-result v1

    .line 143
    cmpl-float v2, v0, v5

    if-nez v2, :cond_0

    cmpl-float v2, v1, v5

    if-eqz v2, :cond_1

    .line 144
    :cond_0
    iget-object v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    invoke-virtual {v2, v0, v1}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 145
    :cond_1
    return-void
.end method

.method b(FFF)F
    .locals 1
    .parameter
    .parameter
    .parameter

    .prologue
    .line 166
    cmpg-float v0, p3, p2

    if-gtz v0, :cond_0

    .line 167
    const/4 p1, 0x0

    .line 169
    :cond_0
    return p1
.end method

.method protected onMeasure(II)V
    .locals 6
    .parameter
    .parameter

    .prologue
    const/high16 v5, 0x4000

    .line 174
    invoke-super {p0, p1, p2}, Landroid/widget/ImageView;->onMeasure(II)V

    .line 175
    invoke-static {p1}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    .line 176
    invoke-static {p2}, Landroid/view/View$MeasureSpec;->getSize(I)I

    move-result v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    .line 178
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->m:I

    iget v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    if-ne v0, v1, :cond_0

    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->m:I

    iget v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    if-eq v0, v1, :cond_1

    .line 179
    :cond_0
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    if-eqz v0, :cond_1

    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    if-nez v0, :cond_2

    .line 209
    :cond_1
    :goto_0
    return-void

    .line 181
    :cond_2
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->m:I

    .line 183
    iget v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->l:F

    const/high16 v1, 0x3f80

    cmpl-float v0, v0, v1

    if-nez v0, :cond_3

    .line 186
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->getDrawable()Landroid/graphics/drawable/Drawable;

    move-result-object v0

    .line 187
    if-eqz v0, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v1

    if-eqz v1, :cond_1

    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v1

    if-eqz v1, :cond_1

    .line 189
    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicWidth()I

    move-result v1

    .line 190
    invoke-virtual {v0}, Landroid/graphics/drawable/Drawable;->getIntrinsicHeight()I

    move-result v0

    .line 192
    iget v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    int-to-float v2, v2

    int-to-float v3, v1

    div-float/2addr v2, v3

    .line 193
    iget v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    int-to-float v3, v3

    int-to-float v4, v0

    div-float/2addr v3, v4

    .line 194
    invoke-static {v2, v3}, Ljava/lang/Math;->max(FF)F

    move-result v2

    .line 195
    iget-object v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    invoke-virtual {v3, v2, v2}, Landroid/graphics/Matrix;->setScale(FF)V

    .line 197
    iget v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    int-to-float v3, v3

    int-to-float v0, v0

    mul-float/2addr v0, v2

    sub-float v0, v3, v0

    .line 198
    iget v3, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    int-to-float v3, v3

    int-to-float v1, v1

    mul-float/2addr v1, v2

    sub-float v1, v3, v1

    .line 199
    div-float/2addr v0, v5

    .line 200
    div-float/2addr v1, v5

    .line 202
    iget-object v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    invoke-virtual {v2, v1, v0}, Landroid/graphics/Matrix;->postTranslate(FF)Z

    .line 204
    iget v2, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->b:I

    int-to-float v2, v2

    mul-float/2addr v1, v5

    sub-float v1, v2, v1

    iput v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->d:F

    .line 205
    iget v1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->c:I

    int-to-float v1, v1

    mul-float/2addr v0, v5

    sub-float v0, v1, v0

    iput v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->e:F

    .line 206
    iget-object v0, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->f:Landroid/graphics/Matrix;

    invoke-virtual {p0, v0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->setImageMatrix(Landroid/graphics/Matrix;)V

    .line 208
    :cond_3
    invoke-virtual {p0}, Lcom/TwinBlade/PicturePassword/TouchImageView;->a()V

    goto :goto_0
.end method

.method public setMaxZoom(F)V
    .locals 0
    .parameter

    .prologue
    .line 102
    iput p1, p0, Lcom/TwinBlade/PicturePassword/TouchImageView;->j:F

    .line 103
    return-void
.end method
